package utils;

import org.webrtc.EglBase;

public class WebRTCEglUtils {
    private static EglBase rootEglBase;

    public static EglBase getRootEglBase() {
        if (rootEglBase == null) {
            rootEglBase = EglBase.create();
        }
        return rootEglBase;
    }

    public static EglBase.Context getRootEglBaseContext() {
        return getRootEglBase() != null ? getRootEglBase().getEglBaseContext() : null;
    }
}